<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        #box{
            width: 100px;
            height: 100px;
            background-color: yellowgreen;
            border-radius: 50%;
            margin-left: 0px;
        }
    </style>
</head>
<body>
            <div id='box'></div>

            <script>
                boxObj = document.getElementById('box');


                function foo() {
                    var newmarginLeft = parseInt(window.getComputedStyle(boxObj)['marginLeft']);
                    boxObj.style.marginLeft =newmarginLeft + 1 + 'px'
                }
               timer = setInterval(foo,10)
            </script>
</body>
</html>